﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text;
using SRP_LibBusinessEntity;
using System.Data;
namespace SRP_LibDataAccess
{
    public class CFormatCorreo
    {
        public DataTable ListarFormato()
        {
            WSParametria.wsParametria ws = new WSParametria.wsParametria();
            ws.Url = System.Configuration.ConfigurationManager.AppSettings["rutaWSParametria"].ToString();
            DataSet ds = ws.ListarFormato();
            return ds.Tables[0];
        }

        public DataTable MostrarFormato(int TIPO_CORREO)
        {
            WSParametria.wsParametria ws = new WSParametria.wsParametria();
            ws.Url = System.Configuration.ConfigurationManager.AppSettings["rutaWSParametria"].ToString();
            DataSet ds = ws.MostrarFormato(TIPO_CORREO);
            return ds.Tables[0];
        }
        
        public int UpdateFormato(int TIPO_CORREO, string TITULO_CORREO, string DETALLE_CORREO)
        {
            DataSet ds = new DataSet();
            WSParametria.wsParametria ws = new WSParametria.wsParametria();
            ws.Url = System.Configuration.ConfigurationManager.AppSettings["rutaWSParametria"].ToString();
            return ws.UpdateFormato(TIPO_CORREO, TITULO_CORREO, DETALLE_CORREO);
        }
    }
}
